INC=-I ../lua -I ../third
LIB=
OBJ=lpcap.o lpcode.o lpprint.o lptree.o lpvm.o lsha1.o lsproto.o lua_3rd.o lua-crypt.o sproto.o pb.o ls_sqlite3.o luasql.o
TARGET=liblua3rd.a

CC=gcc
CXX=g++
DEFINE=-D_GNU_SOURCE -D_REENTRANT
CFLAGS=-g -O2 -pipe -Wall -fno-strict-aliasing -Wno-sizeof-pointer-memaccess -fPIC
CFLAGS+=$(DEFINE)
CFLAGS+=$(INC)
CFLAGS+=$(LIB)

all:$(TARGET)
$(TARGET):$(OBJ)
	ar rcs $(TARGET) $(OBJ)
%.o:%.cpp
	$(CXX) $(CFLAGS) -c $<
%.o:%.c
	$(CC) $(CFLAGS) -c $<
clean:
	rm -rf $(TARGET) *.o
